'use strict';

const { Service } = require('egg');
const ModelName = 'FarmInfo'
class RouterService extends Service {

    async findOne(id) {
      return this.ctx.model[ModelName].findOne({
        where: {
          id,
        },
      });
    }
    // 所有列表
    async allList(where) {
        return this.ctx.model[ModelName].findAll({
            where,
            order:[
                // id 降序
            ],
        });
    }
}

module.exports = RouterService;
